package com.justech.mes.utils;

/**
 * @author feifei.li
 */
public class StringUtil {

    /**
     * 判断对象是否是空或者null
     *
     * @param o
     * @return
     */
    public static boolean isNotBlank(Object o) {
        try {
            return o.toString().trim().length() > 0;
        } catch (Exception e) {
            return false;
        }
    }

    public static boolean isBlank(Object o) {
        return !isNotBlank(o);
    }

    public static void main(String[] args) {
        System.out.println(StringUtil.isNotBlank("2  "));
    }
}
